﻿<ResourceDictionary
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	xmlns:dataForm="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data.DataForm.Toolkit"
	xmlns:local="clr-namespace:Coproject.Controls"
	mc:Ignorable="d">

	<ResourceDictionary.MergedDictionaries>
		<ResourceDictionary Source="CoreStyles.xaml"/>
		<ResourceDictionary Source="ToolkitStyles.xaml"/>
		<ResourceDictionary Source="Styles.xaml"/>
	</ResourceDictionary.MergedDictionaries>

	<Style x:Key="LeftBorderStyle" BasedOn="{StaticResource LinksBorderStyle}" TargetType="Border">
		<Setter Property="Margin" Value="10,135,25,0"/>
	</Style>

	<Style x:Key="ApplicationHeaderStyle" TargetType="StackPanel">
		<Setter Property="Orientation" Value="Horizontal" />
		<Setter Property="HorizontalAlignment" Value="Right" />
		<Setter Property="VerticalAlignment" Value="Top" />
	</Style>

	<Style x:Key="MainContentStyle" TargetType="ContentControl">
		<Setter Property="Background" Value="Transparent"/>
		<Setter Property="BorderBrush" Value="Transparent"/>
		<Setter Property="Margin" Value="80,220,0,0"/>
		<Setter Property="Padding" Value="0 0 15 15"/>
		<Setter Property="VerticalContentAlignment" Value="Stretch"/>
		<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
	</Style>

	<Style x:Key="ApplicationTitleStyle" TargetType="TextBlock" BasedOn="{StaticResource ApplicationNameStyle}">
		<Setter Property="Margin" Value="90,55,0,0"/>
		<Setter Property="VerticalAlignment" Value="Top"/>
	</Style>

	<Style x:Key="NavigationMenuItemStyle" TargetType="ListBoxItem">
		<Setter Property="BorderThickness" Value="0"/>
		<Setter Property="BorderBrush" Value="{StaticResource NavigationBorderBrush}"/>
		<Setter Property="Foreground" Value="{StaticResource NavigationForegroundBrush}"/>
		<Setter Property="FontFamily" Value="{StaticResource HeaderFontFamily}"/>
		<Setter Property="FontSize" Value="{StaticResource NavigationFontSize}"/>
		<Setter Property="TextOptions.TextHintingMode" Value="Animated" />
		<Setter Property="Cursor" Value="Hand"/>
		<Setter Property="MinHeight" Value="28"/>
		<Setter Property="MinWidth" Value="78"/>
		<Setter Property="VerticalContentAlignment" Value="Center"/>
		<Setter Property="HorizontalContentAlignment" Value="Center"/>
		<Setter Property="Padding" Value="8,4,18,4"/>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="ListBoxItem">
					<Grid x:Name="grid" Background="{TemplateBinding Background}">
						<VisualStateManager.VisualStateGroups>
							<VisualStateGroup x:Name="CommonStates">
								<VisualState x:Name="Normal"/>
								<VisualState x:Name="MouseOver">
									<Storyboard>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="mouseOverContentPresenter">
											<DiscreteObjectKeyFrame KeyTime="0">
												<DiscreteObjectKeyFrame.Value>
													<Visibility>Visible</Visibility>
												</DiscreteObjectKeyFrame.Value>
											</DiscreteObjectKeyFrame>
										</ObjectAnimationUsingKeyFrames>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="contentPresenter">
											<DiscreteObjectKeyFrame KeyTime="0">
												<DiscreteObjectKeyFrame.Value>
													<Visibility>Collapsed</Visibility>
												</DiscreteObjectKeyFrame.Value>
											</DiscreteObjectKeyFrame>
										</ObjectAnimationUsingKeyFrames>
									</Storyboard>
								</VisualState>
								<VisualState x:Name="Disabled">
									<Storyboard>
										<DoubleAnimation Duration="0" To="0.6" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="grid" d:IsOptimized="True"/>
									</Storyboard>
								</VisualState>
							</VisualStateGroup>
							<VisualStateGroup x:Name="SelectionStates">
								<VisualState x:Name="Unselected">
									<Storyboard>
										<DoubleAnimation Duration="0" To="0.4" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="contentPresenter" d:IsOptimized="True"/>
									</Storyboard>
								</VisualState>
								<VisualState x:Name="Selected"/>
								<VisualState x:Name="SelectedUnfocused"/>
							</VisualStateGroup>
							<VisualStateGroup x:Name="FocusStates">
								<VisualState x:Name="Focused"/>
								<VisualState x:Name="Unfocused"/>
							</VisualStateGroup>
						</VisualStateManager.VisualStateGroups>

						<ContentPresenter x:Name="contentPresenter" 
											  ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" />
						<ContentPresenter x:Name="mouseOverContentPresenter" Visibility="Collapsed"
											  ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" />
					</Grid>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

	<Style x:Key="NavigationMenuStyle" TargetType="ListBox">
		<Setter Property="HorizontalAlignment" Value="Left" />
		<Setter Property="VerticalAlignment" Value="Top" />
		<Setter Property="Margin" Value="80,130,0,0" />
		<Setter Property="BorderThickness" Value="0" />
		<Setter Property="ItemContainerStyle" Value="{StaticResource NavigationMenuItemStyle}" />
	</Style>

	<Style x:Key="CurrentPageTitleStyle" BasedOn="{StaticResource HeaderTextStyle}" TargetType="TextBlock">
		<Setter Property="TextWrapping" Value="NoWrap"/>
		<Setter Property="Margin" Value="80,180,0,0"/>
	</Style>

	<Style x:Key="FilterPanelStyle" TargetType="Border">
		<Setter Property="Background" Value="{StaticResource GrayBrush8}" />
		<Setter Property="CornerRadius" Value="5" />
		<Setter Property="Padding" Value="5" />
	</Style>

	<Style x:Key="FilterTextBoxStyle" TargetType="TextBox" BasedOn="{StaticResource DefaultTextBoxStyle}">
		<Setter Property="Margin" Value="0,0,5,0" />
	</Style>

	<Style x:Key="StatusTextBlockStyle" TargetType="TextBlock" BasedOn="{StaticResource DefaultTextBlockStyle}">
		<Setter Property="Foreground" Value="{StaticResource DisabledForegroundBrush}" />
	</Style>

	<Style x:Key="ListsScrollViewerStyle" TargetType="ScrollViewer" BasedOn="{StaticResource DefaultScrollViewerStyle}">
		<Setter Property="Margin" Value="0,5,0,0" />
		<Setter Property="VerticalScrollBarVisibility" Value="Auto" />
		<Setter Property="BorderThickness" Value="0" />
	</Style>

	<Style x:Key="HiddenButtonStyle" TargetType="ButtonBase">
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="ButtonBase">
					<Grid/>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
		<Setter Property="Visibility" Value="Collapsed"/>
	</Style>

	<Style TargetType="dataForm:DataForm" BasedOn="{StaticResource DefaultDataFormStyle}">
		<Setter Property="CommandButtonsVisibility" Value="None" />
		<Setter Property="CommitButtonStyle" Value="{StaticResource HiddenButtonStyle}" />
		<Setter Property="CancelButtonStyle" Value="{StaticResource HiddenButtonStyle}" />
	</Style>

	<Style TargetType="local:ImageButton" BasedOn="{StaticResource DefaultButtonStyle}">
		<Setter Property="Height" Value="32" />
	</Style>

	<Style TargetType="local:ExtendedTextBox" BasedOn="{StaticResource DefaultTextBoxStyle}" />

</ResourceDictionary>
